{# src/IFI/Symfony2Bundle/Resources/views/Default/layout.html.twig #}

<!DOCTYPE HTML>
<html>
    <head>
        <title>Striped by HTML5 UP</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,700|Open+Sans+Condensed:300,700" rel="stylesheet" />
        <script src="{{ asset('js/jquery.min.js') }}"></script>
        <script src="{{ asset('js/config.js') }}"></script>
        <script src="{{ asset('js/skel.min.js') }}"></script>
        <script src="{{ asset('js/skel-panels.min.js') }}"></script>
        <noscript>
        <link rel="stylesheet" href="{{ asset('css/skel-noscript.css') }}" />
        <link rel="stylesheet" href="{{ asset('style.css') }}" />
        <link rel="stylesheet" href="{{ asset('style-desktop.css') }}" />
        <link rel="stylesheet" href="{{ asset('css/style-wide.css') }}" />
        </noscript>
        <!--[if lte IE 9]><link rel="stylesheet" href="{{ asset('css/ie9.css') }}" /><![endif]-->
        <!--[if lte IE 8]><script src="{{ asset('js/html5shiv.js') }}"></script><link rel="stylesheet" href="{{ asset('css/ie8.css') }}" /><![endif]-->
        <!--[if lte IE 7]><link rel="stylesheet" href="{{ asset('css/ie7.css') }}" /><![endif]-->
    </head>
    <!--
            Note: Set the body element's class to "left-sidebar" to position the sidebar on the left.
            Set it to "right-sidebar" to, you guessed it, position it on the right.
    -->
    <body class="left-sidebar">

        <!-- Wrapper -->
        <div id="wrapper">

            <!-- Content -->
            <div id="content">
                <div id="content-inner">
			{% block main_content %}
				Contenu principal
			{% endblock main_content %}
                </div>
            </div>

            <!-- Sidebar -->
            <div id="sidebar">

                <!-- Login -->
                <nav id="login">
                    <ul>
                        {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
                         Connecté en tant que {{ app.user.username }}  <a href="{{ path('fos_user_security_logout') }}">Déconnexion</a>
                        {% else %}
                            <a href="{{ path('fos_user_security_login') }}">Connexion</a> / 
                            <a href="{{ path('fos_user_registration_register') }}">S'enregistrer</a>
                        {% endif %}
                    </ul>
                </nav>
                
                <!-- Logo -->
                <a href={{ path("homepage") }}>
                    <div id="logo">
                        <h1>SOCIAL NODE</h1>
                    </div>
                </a>                                    
                <!-- Nav -->
                <nav id="nav">
                    <ul>
                        <li class="current_page_item"><a href={{ path("homepage") }}>Derniers articles</a></li>
                    </ul>
                </nav>

                <nav id="nav">
                    <ul>
                        {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
                            <li><a href={{ path("post") }}>Poster un article</a></li>
                        {% endif %}    
                    </ul>
                </nav>

                <!-- Search -->
                <section class="is-search">
                    <form method="post" action="#">
                        <input type="text" class="text" name="search" placeholder="Rechercher un article" />
                    </form>
                </section>

            </div>

        </div>

    </body>
</html>

